#ifndef CMYFILESYSTEM_H
#define CMYFILESYSTEM_H

#include <QFileSystemWatcher>
#include <QObject>
#include <QTimer>

class CMyFileSystem : public QObject {
    Q_OBJECT

  public:
    CMyFileSystem(QObject* parent = nullptr);
    ~CMyFileSystem();

    bool addWatcherPath(const QString& path);
    QStringList addWatcherPaths(const QStringList& paths);
    void removeWatcherPath(const QString& path);
    void removeWatcherPaths(const QStringList& paths);

    QStringList GetFilesWather();
    QStringList GetDirectoriesWather();

  signals:
    void signalDirectoryChanged(const QString& path);
    void signalFileChanged(const QString& path);

  public slots:
    void slotDirectoryChanged(const QString& path);
    void slotFileChanged(const QString& path);

    void slotFileTimerOut();
    void slotDirectorTimerOut();

  private:
    QFileSystemWatcher m_fileWatcher;
    QTimer m_directorTimer;
    QTimer m_fileTimer;

    QString m_strFilePath;
    QString m_strDirectorPath;
};

#endif  // CMYFILESYSTEM_H
